﻿using System.Text.RegularExpressions;

class RealNumbersValidator
{
    private bool IsRealNumber(string textToTest)
    {
        Regex regex = new Regex(@"\A(-)?(0|[1-9][0-9]*)(\.\d+)?\Z");
        return regex.IsMatch(textToTest);
    }
}